Update core.c

Added more comments to source code.