Added public interfaces. Added more const-correctness guarantee.