fix migration bug in index length
allow environment variable to toggle threaded status
use oj instead of yajl
protect against infinite loops in user aliasing