Adds bezier functions and popup opening
Adds tests for outside click removing the popup
Implements curve drawing