Add basic annotation support and tests

Also, a lot of cleanup