A few bugfixes and new features