arrange files and add makefiles to help compiling, also add mat_test