Major restructure. Move in/out controller to class object.