Clening up code