Refactors Functionary-model and removes redundant fields