Initial accuracy tests and bug fixes