Switch bit fields to be numbers instead of lists, and write some tests
Include new tests in test running script