Updated demo's code for clarity, removed some hard coded values