Cleaned Up Code a bit