still bug hunting, but code reads cleaner. comments moved to the line they refer...