clean up compilation code a bit