Calculated lookup: manually parse JSON strings, fix bugs

Yeeeehaaa!