fixed include issues and removed unused variables