More Refactoring & Testing