Code reformat and prepare for Laravel 5