Revert "Revert "Fixes and new""

This reverts commit c900a276f05c3f4e945d78fc17a0af446e0dd54a.