Refactored both libcfnet and cf-serverd in multiple files.