some cleanup
Make including and linking dynamic.