Added brackets to certain statements

Made bracket usage consistent throughout all the loops, if-statements and methods