Added tests for all functionality