moving some stuff around, and taking advantage of netty better