History feature implementation

Fixed services data structure bug, it was one string in a list instead of a list of services.
Had to implement Redis COPY in Lua.
The json.dumps(json.loads()) IMO indicates a data schema problem.