Refactoring to get simple application running
Many many improvements