Factory girl added, new tests and small refactoring