Fix moveitem method. Also add saving moved items to db