Removed private $type variable, fixes #54

Fixes #54