Begin writing scope checking