Tidy up of the PHP class