Add boolean and negative integer support; fix warning in test case

This change implements writeBoolean, fixes some test cases, and adds some support for negative integers.