cleaned up code organization and switch to file config based setup