Liberals win majority government after byelection victories