Added Ajah majority function and moved lua function declaration under relevant comment.