Refactoring code. Abstracted away the datamodel into a separate JS file