fixed up some silliness, slowly getting code into shape