Make brackets consistent and revise OnStats to make the condition checking less redundant.