made everything more modular (private member variables, getter/setter functions, you know, OOP things).

it compiles, not sure if everything is cleaned up.  Will double check later.