rewriting codebase, removing functions