restructured the application according to best practices