Move initialization of library into example file