Split apps into seperate files and attached events