Moved check procedures out of runtime.c