Dev david

Latest and greatest. This one was used for the painting reconstruction. Completely code styled and done. Only thing that is missing is the to/from bit converter which is in PR #6 
n.b. This obsoletes PR #5