Added condition check; code clean up; externalized messages; introduced new default values
Merge remote-tracking branch 'origin/master'