relocating and arranging code into directories