Had to refactor the master

I had to refactor the master code from the ground up so we could
receive push updates from the framework7 repository.