cleaned stuff up a bit in the servlet