removed use of magic numbers in compareTo
removed unneeded imports
implemented some stylistic changes suggested by reports