Fixed class istance creation. Replaced 'id' with 'instancetype'