Done some bugfixing.