Bugfixes, frontend tweaks and little refactors