Ruby script now re-writing reference classes (but without content). This needs to be planned out carefully..