TODO and some cleaning