Universal framework

Fixes #2.