Added in lots of helper methods, made code do what it is supposed to. Still an error with hamming_encode