Fixed Initialization

- consistent init function in library and demo