workdir overhaul. plenty of bug fixes