Split into modules and add linear regression learning

Using linear regression to learn handwritten digits won't be any
good, but just wanted to see how it performs with generating
polynominal features.