Add createWSFrame function. Add comments.