Code cleanup, and client/service split

Addresses issues from https://github.com/guilherme-pg/MozStumbler/pull/2