Minor refactoring

Make constant parameters to function and replace magic value with normal
one