Code tidy and removal of transferred PHP

Just the map code to be transferred and then the base conversion is done