Reworked code

Depends essentials