made proper use of generics, improved internal structure and added
toString() methods to value objects