Added tests for the main functions