Partial commit, merging in changes from Turnpike Android.