Further code improvement, duck-typing instead of explicit inheritance