Rewrite main function

- Add options support
- Move interpretation loop to separate function
- Add evaluation of single expressions