Refactor/exception

Some light-weight clean up