Global dynamics of wave maps and Schrodinger maps