State tests completed. Bugfixes included.