Temporary changes to support v1.0. Need to improve code later on.