Added support for nested wrappers, closes #1