optimizing db write/reads
fixin crashes.
fixin crashes.
changed intentservice to service