general changes to logic and jsonclasses