Fixed weird TRISD bug. Fixed tray encoding constants (divide by four). Added PWM for DC Motor.