Refactoring network2.py, and added new option for weight initialization