Refactor discover controller and Add active project filter

It closes #405.