Delete dead code
Function renaming
Cleanup and minor further Cification