Refactor tests and remove redundant code.
Add additional warnings to be checked on test build