Removed cameraOps and created two methods, closeCamera & startCamera that use basic logic to detect if Motion is currently running. If it is, a button to close it will appear. If not, a button to open it will appear.

Home page now refreshes the snapshot immediately and then at an interval, AND determines if Motion is already running or not, and displays the appropriate button.