Fixed javascript closure, and create a dynamic version of the server... not bad :p