restructure and refactoring

UI in very nice shape now, fixed bug with crashing on release compile