Improve repr regex and improve completion mechanism