Cleaning up pan0.cpp