couple of TODOs, refactoring