refactored Notes to work the same way as Task

This is work in progress with a lot of html that still needs correcting.