Adding first version of data retrieval code.