Second commit, concluding the separation by threads implementation