code reorg and moving files to csql base directory