Cleaned up some of the code. Ready to add EOPD code and communication code.