Reworked to prototype with private variables