Bug fixes and method renaming for clarity.