1. add batch write at flushing dirty slate; 2. spin couple classes into new single files
Wrap up Key into a case class because Array comparison in java doesn't compare array's content