Imporved convolution. Added maxpooling. Added flatten component