Fixed more warnings and removed unused files