cleaning up & refactoring app