Added comments, improved code layout and removed the
excitement-calculating code into its own function 'getExcited()'.