Added background worker.
Changed /rebuild endpoint to accept post