Remade some functions like in References #223, done with Fixes #222
Merged