Move C methods to their respective classes