Little refactor of createItem to make it nicer