Improve the coding style and rearrange the file architecture