Added general frame work for the external conditions and some minor
corrections.