Main ui

@liorhar 

sorry for the delay - forgot to press the "Create pull request" button :)
It's best to work with promises, this will probably eliminate the loading var.