Cleaned, commented, and added stopping