Merge in changes from @ernstki's 'dev' branch (including figure handle tests)