Split frontend js into main and cms