Cleaned up a little after returning to previous code:

Changed a parameter name from: session to params.