refactoring for bits splitting
Merge pull request #70 from bmaurer/bitsplitrefactor

refactoring for bits splitting