Added nonnull annotations
added method isEmpty to Match class
removed unused variable