add a lot of infrastructure
Merge pull request #1 from fisted/master

Suggested infrastructure.