Improved main class and ping command