Added im memory extracting and unit tests to show how it works