Added mode parsing. omg. I need a break now.