Add support for custom js init, add html elements container and refactor