fix a lot of things(the documentatios is bad), cleenup will follow