Moved some files from core to util and modified some includes