initial cleanup
fixed up a lot of cruft