Clarifying comments; optimize and improve regex