heavy refactoring on note package. Sorry, I had to