This method is really long. Do you come up with a way of making it modular? For instance, separating it and using some private methods.