Refactor and implementation of load images
Fixed build errors and added code to generate BoW hist and write training file