Created a separate controller for magic and moved all regarding actions and views to it, also change the require to include in magic api