Reorganise files into module structure