Updated constructor, fixed bugs, and added accessors