Updated BLDC motor controller program. QEI not yet working, UART not working consistently, commutation works, PWM works. Code has been broken into multiple files.