Adding printf, putc, and puts replacement functions. Moving defines to header.