Code is now better documented, plus a few changes to the test mechanism