got rid of unneeded strings + exception safety

this patch forwards kernel names and source code transparently as
`const char*` rather than converting it to `std::string`s;
added static factory member function to program to avoid exceptions
during constructor execution