Copying over initial homework code. Contains basic BoW + SPM.