some cleanup and using associations caching