Revert "Old code"

This reverts commit 653cbc7f9d262452a0ea876360bee99531e296b9.
Old code final