Error checking code, working on connection API. (Again.)