More tests and fixes for new features