Created proper way of extending prototypes

Fix for #87