Fixed stupid local returns.
Fixed lib input (wrong string-template lib).
Fixed string-casting related errors and removed usage of boost::lexical_cast for said functionality.