Added dirty pre and consolelog functions for dirty stuff.