Cleaned up code and made several changes from code review.