Updated example project and library. Some bugs still need to be fixed