Moved most of the Resolution logic into a service. This will make it a bit easier to make a RESTful Resolution API