Update and organize dependencies

Also re-organized the dependencies based on priority of which task is being executed (see comments below).