Refactor user functions to lib package
Merge pull request #1453 from steventlamb/topic/refactor_user_functions_to_lib

Refactor user functions to lib package