Parameters are now parsed from the GET request (no longer hard coded!).

Added input validation.