Refactor methodoverride to make it easier to inherit and extend