Added needed fields and methods to Pin class