Added delete method, minor refactor