Added tests, factories not working