Finalize main loop
Delete old tests
merge with master branch