Fix issues discovered during review

 - rename 'component' to 'facet' in few places
 - add missing "Facet hasMany" relations
 - fix coding style issues