Initial checkin of lib/tests/examples

@redonkulus @mridgway
Also just write out library instead of lib.