Added security. Handled routing errors.
Pretty much done