renamed vars, added TODOs