OO overhaul

Changed completly to be more OO