Fix tests and add functionality