Initial work on reorg into classes