InferSchema, cleanup, library headers

Address #189 except it doesn't do client queuing.. will make a separate issue.
Capitalize e for events.