I'd like to see this refactored, it's a really long method atm.