Remove debug output and variables; improve selector