Added createAction function and updated code to use it (which fixes a bug with Show/Hide transitions).