add comments for platform threading functions, clean up code
add legends to core header files, clean up comments