Split to opt and default, modified makefiles for test
Fix merge conflicts