Tests added to find bugs in code