moved code to new package to avoid package name conflicts.
Modified signature of 2 functions to make them consistent with rest API
format.