Code cleaned a bit