a bunch of bugfixes and new features