Refactoring, updated the copyright dates, and code cleanup.