Removal of useless code and minor updates