support Fedora

 * Also integrates most of the changes from #156