Improved URL handling in Flask, refactored and improved code.
Added better subreddit submission handling.
Added error handling for subreddit submission.
Refactored and improved POST redirect and error handling.
fixes #1.