refactored views and models to be amd modules, setup global config