Temporarily removed the use of matrices
Minor optimizations to batch
Added counter to botmark