Converted some network handlers to scala