Added Reference class and stuff