Implement a more configurable modeline

Closes #40