Updated routes, added logic for processing forms