split war class into methods and add documentation