some cleanup and added generics sample