Objects!

I refactored to use objects like you requested!