Cleanup example code
Touch-up interface and remove unnecessary function