tidying up & some useful php testing stuff