separated datastore into an interface and added metrics counter so you can see what is going into the system.