Begin to transfer code out of codebehind