Cleanup files, fix some invalid references