improved __construct()

Improved dynamic $variable handling :)
used setnx() instead of set()