Remove unneeded k global var

This k was never needed outside of this file, so it's a dirty global.