adds remove/delete functionality, cleans up code. still squiirrely