Performance improvements & const-correctness