remove deprecated and unused functions + coding style fixes