Perft testing

Merge the perft testing branch to master. Closes #2 and #3.