Cleaned Up and commented