Cleaned up tests. Issue: #512