Genericizes the get-poem ajax call.
Fixed a runtime exception.