Cleaned up the resolver class a bit. Still ugly