Cleaned Code and Commented