Some improvements and removed unused things