refactored and added persistence to queue
added to npm dependency installer