Refactored the prior job js to prototype structure