Code clean up on hideAPIBar