Rewriting API module.