Fix coordinate bug, made json more consistent. Still rotation issue and cleanup