Added a bunch of stuff with Lee's help.