Updated SQL for permissions, missing function

Fixed a minor render glitch (extra space) in lookup()
Made the message processing methods public so they show up in javadoc