feature(all): Complete all test code, fix bugs in helper functions