Refactored for cleanliness and added better user notifications