Simplifying

Simplifying some of the code elements to reduce the amount of code.