Removing static vars/methods and using instantiable objects

This PR need also human testing before merging.