Cleaned the code

Few things here and there.