Slimmed up frequency arry and changed learning function to suit
Learning function clean up, still not functional
learning algorithm fixes, still buggy, stops making assignments at one point