improved structure, js file support