Improves instances, adds tests

Fails unit tests.