Finished Refactoring. Resolves #1.