Changes for performance improvement and removed unused methods