adjusted code for use with latest core and coref updates
-removed some no more used shit