Bug fixes and init changes

I'm probably doing github wrong with these frequent commits, and the
fact the commits usually cause a broken master branch