Move GetBuf into main
Refactoring class names