Whee, refactoring!