Reorganized code to contain additional functions, added method to train layers one by one.
Added batch parameter training and options