Consolidated code into single file, removed unnecessary presentation layer