cleaned up some code and made it work with an uno board and an ethernet shield