Cleaned up and updated main code

Cleaned up the code...accelerometer is configuring properly but the
accelerometer isr's are not getting properly called.