Initial branch pull request.

Refactoring, new UI elements and more...