Files_texteditor: Let js do time calculations, fix class loading