Refine tests
Add more delay
Refactoring core.py