Added a bunch of isset checks to get rid of PHP notices.