tests added, refactoring

tests for parameter field size added, code refactored