Update post-receive to use functions