Restoration after rebase

Restore things that whent bad in rebase