Some minor perfomance tunings and documentation update