Bugfixes and further development