JS refactoring of the backend

I moved 4 posts to a new topic: CSS refactoring of the backend