Unify eval-when-compile

1. Don't use a progn, 2. Combine declarations
Use better GUI detection for line numbers