Develop

Fix tests and minor bugs