cleanup comments and unused regex