Refactor everything to use javascript classes.