Bug fix and removing unneccessary files