File refactor

Big and unnecessary. But makes me happy.