Automatic version detection. Include dir cleanup