change coding style and rearrange the file structure