Bugfixes. And small improvements.