Code cleanup
Documentation beautify
Added has_role smarty function