Bug fixes + remove duplicated version + cache code.