Fix crf, crb, fpscr
Rewrite code test tool

Added some tests too