The complexity and size for this method is too large; can you break it up into several methods that match individual responsibilities? I will review the functionality after this refactoring because it will also increase readability