Refactor params reading