using traits
added some documentation
Merge pull request #2 from lsv/use-traits

Use traits