update colors to be white-on-black
refactored javascript for clarity
extract constant
go fmt