cleaned up some code

fixed some bugs with synch code
moved more data from main header to other specific headers