Revert spurious changes between trunk and timelapse branch. Most of these were
introduced as my editor automatically cleaned up trailing whitespace. Some
unnecessary header includes are also removed.