removed a number of printouts
updated state mechanism
many fixes and much cleanup; fixed data download in particular
Merge pull request #2 from bcdev/fix_state_mechanism

Fix state mechanism