Cleaned up add note function.