Cleaning up main application structure. Beginning API restructure.