Cleaned Up Main JS + Added Existing Checking