Rearrange directory structure

1. Put test code into test/
2. Rename some file name
3. Modify Makefile for unit test