remove room on socket close; generalize encode method
add log4j, place log4j.properties in right place, to debug: mvn clean install jetty:run -Dlog4j.debug=true