Updating to use service class

Closes #5