Updated documentation, code cleanup for consistency.