Lot's of changes and corrections

Lot's of changes and corrections