Adjust to 4 spaces for tabs overall.
Add comment explaining how the canvas is working and add constants where applicable.
Add quotes around JSON keys.
Use a non-priviledged port and add consts for host variables.
Add constants for hex colors.
Refactor to avoid global variables and avoid assigning methods in a separate location from implementation.
Update nn.json with a more trained network.