Added main function.
Fixes