Bastion: Adding table tests and re-factoring to account for testability.