some cleanup
documentation

added some fixmes that need to be checked
corrected some comments