implement APIs.
use settings.
fix bad triming.
serve static files in local directory.