Changed how version is handled. Prepared for contracts.