moved utility functions into the api and a plugin

new plugin is core/utils.py