Tidied up support for additional content types

Also added debug to console function