Preliminary debugging complete... Writing test cases...