Closes #4 Fix inheritance logic