Javascript implementation of Amadeus