Wired up tests and made some adjustments