Dynamic attritubes given by json

Also separates part of the character_editor scripts into a js file