Refactored view/action.php

Switched(heh) to switch away from a chain of if/else
Closes #26