[CLEANUP] Reindent all code. Fix a bug with function names