Refactor code to use pre-defined common constants