Fix for #133 - inheritance support.

Tests are also included. Please merge. Thanks!