Inheritance support added (fixes #45)