some TODO and indent and minor fixes