Removed some superfluous code

Decreased execution time, improved readability, etc.