Use .get() explicitly and add a few extra casts to avoid 2 #includes