Added tests and cleaned up factory