refactored app directory into modules and controllers