Merge request

Added new functionality (read commit messages). Code includes TODOs for immediate future. Fixing of ugly-styled code is a TODO as well.