refactoring the main app to seperate folder Fixed #17