Fixed set() bug, added static wrap() function, and improved __call() error-checking