added fix for views in sub directories
refactored base functionality to plug ins for project reuse