Fixed problems, added basic (not working) perft.