Reindent action.php

Also removed useless functions