Added getValueForKey

Added first version of getValueForKey and reordered methods.