Reorganized source folders.
Fixed a lot of bugs, sources ported to Qt5