a few tweaks and bugfixes

@allisonheath I don't have a commit bit anymore but I did want y'all to have code that actually worked so here it is ^_^