Implementing tests and bug fixes.