Fixed many bugs. Currently runs