Initial port - basic features, no UI for settings. Redirect and email are working!