Added Definition class and some new loading code