minor refactorings, extracted some constants