Single-line if, while statements almost completed. Needs debugging.