Service refactor
Fixed #27