Fixed Lots of bugs. Work still incomplete.