Seperate functions for add/delete/edit/upload.

Removed the code responsible for actually adding, deleting, editing,
and uploading from the routes for reusability. Created a BioException
class to handle sending messages back for display.