Removed duplicated code, fixed formatting and removed unused view instance

I found some duplicates in helpers url.php and session.php, then fixed formatting in some places and removed unused view instance in controller. Just wonder what view instance does in controller? :confused: