Added old codes from google codes here.