continued fleshing out instruction functions, fixed logic for if/else if in api.c