add test suite
add an optimizer skeleton
Add a crude optimizer

Closes #4