Formatted code
Added gold counter