update sample
remove compiler warnings
remove old code