Use '\n' instead of std::endl for better performance
Implement corpus relabeling mostly, separated out common functions into header
Fixed bug with uninitialized memory