Replaced hacky first version with JValue-based approach. Still needs work
Fixed name