Fixed retrieval bug and formatting changes