Added more checks

So much work for 1 script, but I learned a lot!