Whoops. I havn't commited all week.
Merged Chris' changes. Added command line mode