general code clean up starting work on networking

Signed-off-by: Tricon2_Elf <tricon2elf@hotmail.com>