Cleaned the the code a bit

Cleaned the the code a bit