1>a capacitor could be connected close to the microcontroller Vdd and Vss pins to avoid some type of feed backs.
2>similarly,in case of small dc motor running on drivers like ULN,relays etc, connect a .1mF capacitor in parallel with motor and ULN supply.
3>connect the resonator or crystal oscillator more close to the PIC pins .
4>if u r using TSOP or such sensors, then always connect a capacitor (abt 10 or 100 mF) near the TSOP power supply legs(decoupling capacitor).A 100 ohm resistor could be used to connect Vcc to TSOP . Then it will be more isolated from disturbances from external noise.
5>As Nickhilele replied, that 3000 ms delay to avoid switch de-bounsing detection is very high and that much delay is not needed to avoid the debouncing effect.