Refactor code for physics constants