Wrote initial library and demo