Data -directory and some restructuring