Cleaned up a bit, still lots of work to do.