Implementing unit tests, errors comming out the woodwork but are being
fixed.