Split the functionality from the examples, added usage in Readme