Core: Fix warnings and random changes