Added battle class. Cleaned up code and annotated.