add custom item resolvers and clean up code