Extracted constants, removed hard coding of string lengths.