Simplify function construction