Bug fixes and remove files