Added tests to Main()