File structure changed to be more logical