Swap public and private methods in code