[DO NOT MERGE] Initial commit of refactor. Still contains old code.

You don't need this; it was relevant before you started using the @deploy object directly.