Removed unused import
Added comments and some data checking to EditNote