Fix array deletes and remove break after return as suggested by Nazar Gerasymchuk <troyan3@gmail.com>