move debug to dev
made extend static
made several functions available outside the prototype