Some cleenup

Errors in test codes, need fixing!