diplomka: huge commit with tons of reworks, fixes and other stuff

As the deadline aproaches, commit size increases :-(