Refactor atBit and safeCast
Merge pull request #48 from julien-truffaut/refactor-atbit-safecast

Refactor atBit and safeCast