remove superflous include
use auto keyword to make code more legible
collapse if statement in datastore
add some comment to datastore