Added some keep alive stuff, needs work