Fixed some bugs. Still some more bugs to fix.

Added a divide function to tests
Fixed some bugs, improved the test suites, still hunting for basic bugs in the move generator