allowing overrides of toString and valueOf functions and tracking instances in array on compiled prototype