Refactoring to remove unnecessary cruft