First working draft as an AMD module