Refactored the prototype inheritance to remove setting __proto__ explicitly. Fixes #10