Functions, classes and inheritance