Migration to an object-oriented format

INCOMPLETE CODE!!!!