Refactor Item and controller, fix bugs