cleaning code- more tests
work in progress user_io and mock_io
refactored comments out