Finalized server/extension code