restructuring, styling, regex search bug fix complete