Fixing some more problems found and making files more neat