Refactored with before filters, moving code to models; Created custom exceptions and handling; Wrote tests for PullRequestController