Added more test code to main.