Code improvements:

- Convert commands to an associative array to make code more readable
- Keep command headers to make it easy to understand data
- Add filter to IP