Squashed 'core/' changes from 2e6259a..bce4ca4

bce4ca4 Merge commit '94bd73ee3ee9a2d968d14af3669b50bcb3408d2c'
94bd73e Squashed 'db/' changes from 13341db..062dd9f
166566c Add some basic functions to core
d4f5de3 Check for class existence

git-subtree-dir: core
git-subtree-split: bce4ca4eb9e7981c8bd2ea2ef0e5106a40670303
Merge commit '10527353fd42b1db9f7e7424125e38cd1fcf1c33'