Adds support for bitfields. Fixes #48 fixes #45