Added categories parameter to dat2js handling.