Oops, put in wrong referencing line (and added few other changes)