Some changes to formatting and regex