Small function to simulate class inheritance.