make check passes now

Also add suggestions from autofoo