Added a 'main' method for running the process from the JBDS IDE.
Fixes #10, as agreed.