Added create function and test #4
Added tests to ensure the different cases are covered #4
Removed force and added create_functions function which will be used in sync_pgfunctions #4