Abstracting code into individual methods