Refactor into a nice directory; produce real output