Fix some TODOs related to logging
Move regex patters to classes