Split main application into several files