Added support for reusing views
Removed unnecessary references