fixed file organisation and added .tmp folders