Cleaned up code and redid serial communications