Added tests and simple interactive testing program