Added requireRole support, fixed bugs with add/modify entities, fixed typos