Merge pull request #70 from bmaurer/bitsplitrefactor

refactoring for bits splitting