added foreign key for widgets
Added widget directive and reorganized module space with app.js
updated template with new module structure