cleaned up code, working on serial com