Add more thread sync for notes

Some function needed to be protected for sync access.
Add travis support for core