Fixed a bug. Now, there can be 0 hidden layers. Started implementing code for training.