some refactorings and adding support for replaying assembly notifications
refactor the remote JSON function; add support for assembly replaying