pass in port via repository/app name

also pulled out unused stuff.