Added null checks and various redundancies.
Merge pull request #13 from AnthonyAMC/development

Added null checks and various redundancies.