general cleanup, all unit tests now pass, added the sphere object type.
now handles null pointer passed as self in a reasonable manner.