Dev

refactored /main router function to use async to flatten out the callback stack