Various bug fixes
Adding sample usage