Controller cleanup
Refactoring, added support for root folders