Cleaned up unused code and inconsistent comments.