Move main loop, new add test, improve add