Converted all blade templates to PHP templates
Implemented active sort detection & re factored the code a bit to avoid repetition