Build and clean fixes