moved R2, R4, R5 and Q3 to better positions.
Define pin functions.

Define all pin functions based on circuit.
Swap functionality of RA3 and RA4

Internal pullup not available on RA3, but needed for lid sensor.
Add direction and pull-ups to I/O