work in progress: comment handling and upgrade script