introduce grains package
continue fleshing out grains package.
- make the interfaces a bit more generic
- javadoc and unit tests
- standardize naming