Remove old factories, move fns into test closure scopes
Refactor functions factories file