Clean up directories and change how links work