turned everything into class and cleaned up some of the globals.. recording data is next.