Made some parts of code more readable