Actually, don't use RAF for now
Inline some math operations
Declare event handler functions separately
One less function call in demo