Improved php code, created Property and util classes.