added delete method and refactored some code in views to go in the config

Signed-off-by: Zach Klabunde <zbunde@gmail.com>