restructured app for best practices