Fix some minor bugs and expand item API