fix screen update in js and reduce size of floats in json, also MARGIN added for debuggin