Refactored Plot constructor, removing redundant code