Better handling of static content and a minor refactor.