Added proper CLI support. Closes #11.