Several changes to remove NP-variables

Feel free to catch up part of this.