Moved meta box code into a PHP class