change type to code

and remove unneccessary property (e.g. type and title in amenity and
facility)