[Cleanup] remove debug code
[Cleanup] undo auto completion and remove unused typedefs, add a const