Bugfixes inside frontend.functions. Some cosmetic codechanges.