Many changes, fixed multiple bugs

Changed namespaces
Added init callback
removed some functions that were outside of the class.
Remove global variable ytplayer and created it inside the class.
Setup better detection to determine the location of the video.
Moved event listeners to appropriate location.
Added callbacks object for apis
Added better error handling.