Removed unused shared constant.
Added angular state-level authorization support.
Added comments.
Simplified  assignment.