Added pseudo type 'referenced' and a few other changes