Code tidy/optimisation

Demo:
-removed redundant pre-check
+advanced for loop will not run if there are no elements
Merge branch 'master' of https://github.com/SEPRGroup/SEPR4Project