Putting the final wraps on the backend private message API. This is more or less what needs to happen for every data type and get all the SQL code out of the front-end controllers.