throw when setAlive params are out of range. some other fixes.
Some refactoring, added NAPALM pattern