Major update -- see diff if you're curious