Started analysis code
REALLY REALLY really bad analysis stuff. Please redo the entire status/input loop!