Refactor to better structure inheritance.