Moved attend and detend into own files