Added annotate, cleaned some bugs