huge code refactor, controllers added