Fixed up code for ansi standards