Re-implement open using extracted libraries.

Closes #67.