Refactored tests and removed unused methods.