Bugfixes. More GUI integration.