Made the controller and config more testable with optional app_dir constructor param.
Added controller and config tests
Added controller and config tests