improve SourceTests

use StringBuilder where possible
made RegEx faster