Added ability to configure id_generator (closes #3).
Simplified services.
Added more thorough tests.