Introduce service abstraction.
Intorduce busines and api services.
Remove debug code.