Removed all goto statements