Cleaning things up with dirname