move class to c functions.
delete more files.
restrcuture