Adding factories nad fixing model test