All the unnecessary source files are removed.
Fixed memory leak caused by too frequently memory allocaton and free of
small size.