Fixed addItem and refactored selectItems

Added fix to addItem to hide newly created items when only completed
items are set as visible; removed redundant code in selectItems