Deleted blank lines between unused methods.
Changed isEmpty() to a more efficient method