Lines 3 to 16 should be indented by a space since they are within a loop. Any code that's within another structure should be indented in relation to the structure to increase readability. Lines 1, 9, 10 and 16 should use constants instead of numbers directly in to improve readability. (E.g.: BUTTON() AND #A instead of BUTTON() AND 16) There are more, but I'll stop for now.