Basic PHP classes & important logic