Move main API functionality to the package
Use absolute imports in settings

This is necessary since this file is executed.