Refactoring

Moved The Neural Network Code to a new Class and Stuctured it