Updating and cleaning code, fixing gateway definitions erros and user management with deploy environments