Refactor job queue. Working initial deposit API.

Added metrics to deposit API, too.