Added examples

Examples added and some bugs fixed - seems to be working now