remove unused code
add loops to autocomplete in Qt GUI