Added example code to main source file. Fixed example code in readme.