#401 Reorganized large methods in separate methods