Fix some iteration bugs / Reorganise folders