Ok, removed the TODO and reorganized the code a little.