mainly externalized some constants for tidiness
Merge remote-tracking branch 'origin/master'