Moved user functions out of MySQL class