Implement queue for matrix generation and metrics calculation.
Refactoring: removing template class header comments, removing unnecessary boxing (new Integer), making static string as constant.