Annotated some subroutines