add JS documentation, refactor parts of JS, use strict, make Redis not persistent when using Foreman