Restructure files such that ping is in its own file