Todos and test fixes