allow catalog access from lua, slew of other minor fixes