TODO and printfs
quite a few fixes and improvements
Minor stuff