Refactored....kind of.