Fix bad order in optimization loop
Move source to src subdir