Added const declarations and fixed kernel variable capitalization