improve formatting
improve docs
update TODO
reformat all code