Attempt to use more OO js