rewrite header files  and delete old files

also build a new lib file