Adding comments and changing function names to camelCase