Fixed style of .c and .h files to use 2 spaces instead of 4 spaces and tabs and added some braces for easier code reading.