Cleaned up, and organized the code: separated error functions, made learning/testing faster by selecting random subsets, and made a testing framework for different learning methods. Easier to develop now.