Fixed TODOs: move some prototypes and some renames