Refactoring to prevent unnecessary code reuse

Statistic Handler restructiring
minor work around to counter error in jvm for mac