Cleaning this up so it works on Windows to at least some passable
approximation. Also removing the redundant leader blocks that somehow got
copied/pasted.