More sturdy api design.

Added minified file which needs to be tested.