refactored a lot; services are separate from modules