reorganized main application as a package