Motion detection functionalities finished

- All motion detection functionalities implemented.
- Calls based on HTTP request (move to sockets?)
- Pattern page ready
- Free motion functionality ready
- Script files separated for improved organization
- Event listeners ready for motion and orientation detection
- Remove event listeners when not used