Code clean and a few more changes