Fixed risk of nullPointerExceptions in GroupsActivity and MainActivity. And closed the db cursor in LibraryHelper.