adding kevin's code with source separated into different packages
Merge branch 'master' into newcode