Updating .gitignore to handle *.d files
Moving declarations to the start of functions to conform to older C standard
Passes 9 test cases