Did some refactoring. Add one entry point to run application