Cleaned Up Code