Major rewrite, no more singleton stuff.