Removed useless class.
Changed counter to AtomicLong instead of long to avoid concurrency issues.