Basic refactoring here. Cleaner, smaller methods.