Expert

Added methods for replacing authors of pages when Users are deleted and replacing Experts if necessary
Ok, you aren't going to like this, but my main objection to this function is that it can cause 7 SQL queries under the right conditions. In addition, this function is called from another SQL query, so we have 8+ queries for just one operation. Each page makes at least one query...

Some of these can be combined into one specialized query. For example, the insertExpert and deleteExpert query could be combined into a replace if exists query like I do with views.