Demo/cbk tests

Added some basic tests in ansTests.R and made a few minor tweeks to the rest of the code.