Fixed factory logic, removed is valid check, changed an analyse fields method