UPDATE: Code changes to work with SilverStripe 3