cleaned-up TODO and added some doc