improve tests and reorganise groovy, add json unmarshaller via groovy