Naming Try using a non-confusing naming scheme for your new functions and variable names. It doesn't necessarily have to mean that you should use the same as in other places of the code, just that the names should be logical, understandable and be named according to what they're used for. File-local functions should be made static. Indenting Please try using the same indenting levels and bracing method as all the other code already does. It makes the source code a lot easier to follow if all of it is written using the same style.
Commented code is quality code and enables future modifications much more.
Uncommented code much more risk being completely replaced when someone wants to extend things, since other persons' source code can get quite hard to read. General Style Keep your functions small. If they're small you avoid a lot of mistakes and you don't accidentally mix up variables. When you write new functionality or fix bugs, it is important that you don't fiddle all over the source files and functions. Remember that it is likely that other people have done changes in the same source files as you have and possibly even in the same functions.