Cleaned the code

Dirty but ok