Core: Adding const to many types to suppress g++ warnings