move service methods to service, do some cleanup, -yuri