refactor encoder package structure
add OWS-style Exception handling mechanism. closes #13