Minor cleanup of vars and JSON loader