HMM code

HMM code working up to the training fase. Working on getting this
user-friendly and readable