fix a few bugs, and minor presentational issues