Added a new structure behind the layer objects and added some vary basic training code