Fixed bitfields + added tests.