Feature/improve javascript