Added instance checking in constructor. Fixed scoped prototype renaming