Deleted twice reversed function added note to prevent this happening. Labled global vars where noticed.
Added missing case still not working