Fix bugs, set correct headers, etc.