Code clean up

Now it is a bit more readable