Extract full implementation to gist