Refactored app into it's on separate file.