refactored drafts and search logic into index controller method
refactor control flow for index on controller