Added main method. (Can be ran as a standalone application now.)