Lots of little boring stuff, some of which binds this thing to Linux irreparably