refactored and moar functionality...merge me up Scotty!