Made ServiceResolver become an interface. Added javadocs.